package video

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type VideoWorksRouter struct{}

// InitVideoWorksRouter 初始化 videoWorks表 路由信息
func (s *VideoWorksRouter) InitVideoWorksRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	videoWorksRouter := Router.Group("videoWorks").Use(middleware.OperationRecord())
	videoWorksRouterWithoutRecord := Router.Group("videoWorks")
	videoWorksRouterWithoutAuth := PublicRouter.Group("videoWorks")
	{
		videoWorksRouter.POST("createVideoWorks", videoWorksApi.CreateVideoWorks)             // 新建videoWorks表
		videoWorksRouter.DELETE("deleteVideoWorks", videoWorksApi.DeleteVideoWorks)           // 删除videoWorks表
		videoWorksRouter.DELETE("deleteVideoWorksByIds", videoWorksApi.DeleteVideoWorksByIds) // 批量删除videoWorks表
		videoWorksRouter.PUT("updateVideoWorks", videoWorksApi.UpdateVideoWorks)              // 更新videoWorks表
	}
	{
		videoWorksRouterWithoutRecord.GET("findVideoWorks", videoWorksApi.FindVideoWorks)       // 根据ID获取videoWorks表
		videoWorksRouterWithoutRecord.GET("getVideoWorksList", videoWorksApi.GetVideoWorksList) // 获取videoWorks表列表
	}
	{
		videoWorksRouterWithoutAuth.GET("getVideoWorksPublic", videoWorksApi.GetVideoWorksPublic) // videoWorks表开放接口
	}
}
